<?php
/**
 * Created by PhpStorm.
 * User: xiaomeng
 * Date: 17-7-11
 * Time: 下午1:20
 */
return [
    'websocket'=>[
        //server
        'host'=>'0.0.0.0',//ip
        'port'=>9509,//端口
        'process_name'=>'dist_game',//进程名字
//        'reactor_num' => 2, //调节主进程内事件处理线程的数量
        'worker_num' => 2,    //worker进程数
        'max_request' => 50000,//每个work达到这个请求重启，防止内存泄漏
        'task_worker_num' => 10,    //配置Task进程的数量
        'task_max_request' => 20000,    //每个task达到这个请求重启，防止内存泄漏
        'backlog' => 128,   //等待连接数，系统内核参数与此对比，取最小值
        'dispatch_mode' => 2,//不能改变，否则close不起作用
        'log_file' => ROOTPATH.'/tmp/log/swoole.log',//日志文件保存位置
        'log_level' => 1,//日志级别  0 =>DEBUG 1 =>TRACE 2 =>INFO 3 =>NOTICE 4 =>WARNING 5 =>ERROR
        'pid_file' => 'server.pid',//pid位置
        'heartbeat_idle_time' => 600,//最大空闲时间s *del server config
        'heartbeat_check_interval' => 100,//检测心跳时间s *del server config
        'daemonize' => 0,//是否为守护模式

        //app
        'send_interval_limit'=>200,//发送消息的间隔时间(ms)
        'message_max_len'=>1024,//文字消息的长度(utf-8)
        'receive_replay'=>true,//消息接受成功是否应答
    ]
];